#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int array[33] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
				 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
				 31, 32};

int main_add()
{
    /*1149:	f3 0f 1e fa          	endbr64 
    114d:	55                   	push   %rbp
    114e:	48 89 e5             	mov    %rsp,%rbp
    1151:	48 83 ec 10          	sub    $0x10,%rsp
    1155:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)
    115c:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)*/
	int j = 0;
	int i = 0;

    //1163:	e9 b5 00 00 00       	jmpq   121d <main_add+0xd4>
	for (i = 0; i <= 10; i++) {

 	//1168:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)
		j++;

    /*116c:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax = 1
    116f:	83 e8 01             	sub    $0x1,%eax		// eax = 0
    1172:	48 98                	cltq   
    1174:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	// rdx = 0*4+0 = 0
    117b:	00 
    117c:	48 8d 05 9d 2e 00 00 	lea    0x2e9d(%rip),%rax        # 4020 <array>
    1183:	8b 14 02             	mov    (%rdx,%rax,1),%edx	// edx = 0+a*1 = a[0]
    1186:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax = 1
    1189:	89 d1                	mov    %edx,%ecx			// ecx = a
    118b:	89 c2                	mov    %eax,%edx			// edx = 1
    118d:	be 10 00 00 00       	mov    $0x10,%esi			// esi = 0x10
    1192:	48 8d 3d 6f 0e 00 00 	lea    0xe6f(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    1199:	b8 00 00 00 00       	mov    $0x0,%eax
    119e:	e8 ad fe ff ff       	callq  1050 <printf@plt>*/	
		printf("%d %d %d\n", 0x10, j, array[j-1]);

    //11a3:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)	// (rbp-0x4) = 1+1 = 2
		j++;

    /*11a7:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax = 2
    11aa:	83 e8 01             	sub    $0x1,%eax		// eax = 1
    11ad:	48 98                	cltq   
    11af:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	//rdx = 1*4+0 = 4
    11b6:	00 
    11b7:	48 8d 05 62 2e 00 00 	lea    0x2e62(%rip),%rax        # 4020 <array>
    11be:	8b 14 02             	mov    (%rdx,%rax,1),%edx	// edx = 4+array*1 = array[1]
    11c1:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax = 2
    11c4:	89 d1                	mov    %edx,%ecx			// ecx = array[4];
    11c6:	89 c2                	mov    %eax,%edx			// edx = 2
    11c8:	be 12 00 00 00       	mov    $0x12,%esi			// esi = 0x12
    11cd:	48 8d 3d 34 0e 00 00 	lea    0xe34(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    11d4:	b8 00 00 00 00       	mov    $0x0,%eax
    11d9:	e8 72 fe ff ff       	callq  1050 <printf@plt>*/
		printf("%d %d %d\n", 0x12, j, array[j-1]);

    //11de:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)
		j++;

    /*11e2:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax = 3
    11e5:	83 e8 01             	sub    $0x1,%eax		// eax = 2
    11e8:	48 98                	cltq   
    11ea:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	// rdx = 2*4 = 8
    11f1:	00 
    11f2:	48 8d 05 27 2e 00 00 	lea    0x2e27(%rip),%rax        # 4020 <array>
    11f9:	8b 14 02             	mov    (%rdx,%rax,1),%edx	// edx = 8+array = array[2]
    11fc:	8b 45 fc             	mov    -0x4(%rbp),%eax
    11ff:	89 d1                	mov    %edx,%ecx
    1201:	89 c2                	mov    %eax,%edx
    1203:	be 14 00 00 00       	mov    $0x14,%esi
    1208:	48 8d 3d f9 0d 00 00 	lea    0xdf9(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    120f:	b8 00 00 00 00       	mov    $0x0,%eax
    1214:	e8 37 fe ff ff       	callq  1050 <printf@plt>*/
		printf("%d %d %d\n", 0x14, j, array[j-1]);

    /*1219:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)
    121d:	83 7d f8 0a          	cmpl   $0xa,-0x8(%rbp)
    1221:	0f 8e 41 ff ff ff    	jle    1168 <main_add+0x1f>*/
	
	}

    /*1227:	b8 00 00 00 00       	mov    $0x0,%eax
    122c:	c9                   	leaveq 
    122d:	c3                   	retq   */

	return 0;
}

int add_main()
{
    /*122e:	f3 0f 1e fa          	endbr64 
    1232:	55                   	push   %rbp
    1233:	48 89 e5             	mov    %rsp,%rbp
    1236:	48 83 ec 10          	sub    $0x10,%rsp
    123a:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)
    1241:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp) */
		int j = 0;
		int i = 0;

		for (i = 0; i <= 10; i++) {
    //1248:	e9 b5 00 00 00       	jmpq   1302 <add_main+0xd4>
    //124d:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)
		++j;

    /*1251:	8b 45 fc             	mov    -0x4(%rbp),%eax
    1254:	83 e8 01             	sub    $0x1,%eax
    1257:	48 98                	cltq   
    1259:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx
    1260:	00 
    1261:	48 8d 05 b8 2d 00 00 	lea    0x2db8(%rip),%rax        # 4020 <array>
    1268:	8b 14 02             	mov    (%rdx,%rax,1),%edx
    126b:	8b 45 fc             	mov    -0x4(%rbp),%eax
    126e:	89 d1                	mov    %edx,%ecx
    1270:	89 c2                	mov    %eax,%edx
    1272:	be 46 00 00 00       	mov    $0x46,%esi
    1277:	48 8d 3d 8a 0d 00 00 	lea    0xd8a(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    127e:	b8 00 00 00 00       	mov    $0x0,%eax
    1283:	e8 c8 fd ff ff       	callq  1050 <printf@plt>*/
		printf(" %d %d %d\n", 0x46, j, array[j-1]);

    //1288:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)
		++j;

    /*128c:	8b 45 fc             	mov    -0x4(%rbp),%eax
    128f:	83 e8 01             	sub    $0x1,%eax
    1292:	48 98                	cltq   
    1294:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx
    129b:	00 
    129c:	48 8d 05 7d 2d 00 00 	lea    0x2d7d(%rip),%rax        # 4020 <array>
    12a3:	8b 14 02             	mov    (%rdx,%rax,1),%edx
    12a6:	8b 45 fc             	mov    -0x4(%rbp),%eax
    12a9:	89 d1                	mov    %edx,%ecx
    12ab:	89 c2                	mov    %eax,%edx
    12ad:	be 48 00 00 00       	mov    $0x48,%esi
    12b2:	48 8d 3d 4f 0d 00 00 	lea    0xd4f(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    12b9:	b8 00 00 00 00       	mov    $0x0,%eax
    12be:	e8 8d fd ff ff       	callq  1050 <printf@plt> */
		printf(" %d %d %d\n", 0x48, j, array[j-1]);

    //12c3:	83 45 fc 01          	addl   $0x1,-0x4(%rbp)
		++j;

    /*12c7:	8b 45 fc             	mov    -0x4(%rbp),%eax
    12ca:	83 e8 01             	sub    $0x1,%eax
    12cd:	48 98                	cltq   
    12cf:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx
    12d6:	00 
    12d7:	48 8d 05 42 2d 00 00 	lea    0x2d42(%rip),%rax        # 4020 <array>
    12de:	8b 14 02             	mov    (%rdx,%rax,1),%edx
    12e1:	8b 45 fc             	mov    -0x4(%rbp),%eax
    12e4:	89 d1                	mov    %edx,%ecx
    12e6:	89 c2                	mov    %eax,%edx
    12e8:	be 4a 00 00 00       	mov    $0x4a,%esi
    12ed:	48 8d 3d 14 0d 00 00 	lea    0xd14(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    12f4:	b8 00 00 00 00       	mov    $0x0,%eax
    12f9:	e8 52 fd ff ff       	callq  1050 <printf@plt>*/
		printf(" %d %d %d\n", 0x4a, j, array[j-1]);
	}

    /*12fe:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)
    1302:	83 7d f8 0a          	cmpl   $0xa,-0x8(%rbp)
    1306:	0f 8e 41 ff ff ff    	jle    124d <add_main+0x1f>
    130c:	b8 00 00 00 00       	mov    $0x0,%eax
    1311:	c9                   	leaveq 
    1312:	c3                   	retq   */
	
	return 0;
}

int array_main()
{
    /*1313:	f3 0f 1e fa          	endbr64 
    1317:	55                   	push   %rbp
    1318:	48 89 e5             	mov    %rsp,%rbp
    131b:	48 83 ec 10          	sub    $0x10,%rsp
    131f:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)
    1326:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)*/
		int j = 0;
		int i = 0;

    //132d:	e9 b2 00 00 00       	jmpq   13e4 <array_main+0xd1>
		for (i = 0; i <= 10; i++) {

    /*1332:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax = j = 0
    1335:	8d 50 01             	lea    0x1(%rax),%edx	// edx = 0 + 1
    1338:	89 55 fc             	mov    %edx,-0x4(%rbp)	// (rbp-0x4) = 1
    133b:	48 98                	cltq   
    133d:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	// rdx = 0*4 = 0
    1344:	00 
    1345:	48 8d 05 d4 2c 00 00 	lea    0x2cd4(%rip),%rax        # 4020 <array>
    134c:	8b 14 02             	mov    (%rdx,%rax,1),%edx	// edx = (0x0+array*1) = array[0])
    134f:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax = 1
    1352:	89 d1                	mov    %edx,%ecx			// ecx = array[0]
    1354:	89 c2                	mov    %eax,%edx			// edx = 1
    1356:	be 7b 00 00 00       	mov    $0x7b,%esi			// esi
    135b:	48 8d 3d a6 0c 00 00 	lea    0xca6(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    1362:	b8 00 00 00 00       	mov    $0x0,%eax
    1367:	e8 e4 fc ff ff       	callq  1050 <printf@plt>*/
			printf("%d %d %d\n", 0x7b, j, array[j++]);

    /*136c:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax = 1
    136f:	8d 50 01             	lea    0x1(%rax),%edx	// edx = 1 + 1 = 2
    1372:	89 55 fc             	mov    %edx,-0x4(%rbp)	// (rbp-0x4) = 2
    1375:	48 98                	cltq   
    1377:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	// rdx = 1*4 = 4
    137e:	00 
    137f:	48 8d 05 9a 2c 00 00 	lea    0x2c9a(%rip),%rax        # 4020 <array>
    1386:	8b 14 02             	mov    (%rdx,%rax,1),%edx	// edx = 4+array = array[1]
    1389:	8b 45 fc             	mov    -0x4(%rbp),%eax		// eax = 2
    138c:	89 d1                	mov    %edx,%ecx
    138e:	89 c2                	mov    %eax,%edx
    1390:	be 7c 00 00 00       	mov    $0x7c,%esi
    1395:	48 8d 3d 6c 0c 00 00 	lea    0xc6c(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    139c:	b8 00 00 00 00       	mov    $0x0,%eax
    13a1:	e8 aa fc ff ff       	callq  1050 <printf@plt> */
			printf("%d %d %d\n", 0x7c, j, array[j++]);

    /*13a6:	8b 45 fc             	mov    -0x4(%rbp),%eax
    13a9:	8d 50 01             	lea    0x1(%rax),%edx
    13ac:	89 55 fc             	mov    %edx,-0x4(%rbp)
    13af:	48 98                	cltq   
    13b1:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx
    13b8:	00 
    13b9:	48 8d 05 60 2c 00 00 	lea    0x2c60(%rip),%rax        # 4020 <array>
    13c0:	8b 14 02             	mov    (%rdx,%rax,1),%edx
    13c3:	8b 45 fc             	mov    -0x4(%rbp),%eax
    13c6:	89 d1                	mov    %edx,%ecx
    13c8:	89 c2                	mov    %eax,%edx
    13ca:	be 7d 00 00 00       	mov    $0x7d,%esi
    13cf:	48 8d 3d 32 0c 00 00 	lea    0xc32(%rip),%rdi        # 2008 <_IO_stdin_used+0x8>
    13d6:	b8 00 00 00 00       	mov    $0x0,%eax
    13db:	e8 70 fc ff ff       	callq  1050 <printf@plt>*/
			printf("%d %d %d\n", 0x7d, j, array[j++]);

    /*13e0:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)
    13e4:	83 7d f8 0a          	cmpl   $0xa,-0x8(%rbp)
    13e8:	0f 8e 44 ff ff ff    	jle    1332 <array_main+0x1f>*/
	}

    //13ee:	c7 45 fc 00 00 00 00 	movl   $0x0,-0x4(%rbp)
    //13f5:	c7 45 f8 00 00 00 00 	movl   $0x0,-0x8(%rbp)
		j = 0;
		i = 0;

    //13fc:	e9 a3 00 00 00       	jmpq   14a4 <array_main+0x191>
	for (i = 0; i <= 10; i++) {

    /*1401:	8b 45 fc             	mov    -0x4(%rbp),%eax	// eax = j = 0
    1404:	8d 50 01             	lea    0x1(%rax),%edx	// edx = 1
    1407:	89 55 fc             	mov    %edx,-0x4(%rbp)	// (rbp-0x4) = 1
    140a:	48 98                	cltq   
    140c:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx	// rdx = 0*4 = 0
    1413:	00 
    1414:	48 8d 05 05 2c 00 00 	lea    0x2c05(%rip),%rax        # 4020 <array>
    141b:	8b 04 02             	mov    (%rdx,%rax,1),%eax	// eax = (0+array*1) = array[0]
    141e:	89 c2                	mov    %eax,%edx		// edx = array[0]
    1420:	be 83 00 00 00       	mov    $0x83,%esi		// esi = 0x83
    1425:	48 8d 3d ff 0b 00 00 	lea    0xbff(%rip),%rdi        # 202b <_IO_stdin_used+0x2b>
    142c:	b8 00 00 00 00       	mov    $0x0,%eax
    1431:	e8 1a fc ff ff       	callq  1050 <printf@plt>*/
		printf("%d %d\n", 0x83, array[j++]);

    /*1436:	8b 45 fc             	mov    -0x4(%rbp),%eax
    1439:	8d 50 01             	lea    0x1(%rax),%edx
    143c:	89 55 fc             	mov    %edx,-0x4(%rbp)
    143f:	48 98                	cltq   
    1441:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx
    1448:	00 
    1449:	48 8d 05 d0 2b 00 00 	lea    0x2bd0(%rip),%rax        # 4020 <array>
    1450:	8b 04 02             	mov    (%rdx,%rax,1),%eax
    1453:	89 c2                	mov    %eax,%edx
    1455:	be 84 00 00 00       	mov    $0x84,%esi
    145a:	48 8d 3d ca 0b 00 00 	lea    0xbca(%rip),%rdi        # 202b <_IO_stdin_used+0x2b>
    1461:	b8 00 00 00 00       	mov    $0x0,%eax
    1466:	e8 e5 fb ff ff       	callq  1050 <printf@plt>*/
		printf("%d %d\n", 0x84, array[j++]);

    /*146b:	8b 45 fc             	mov    -0x4(%rbp),%eax
    146e:	8d 50 01             	lea    0x1(%rax),%edx
    1471:	89 55 fc             	mov    %edx,-0x4(%rbp)
    1474:	48 98                	cltq   
    1476:	48 8d 14 85 00 00 00 	lea    0x0(,%rax,4),%rdx
    147d:	00 
    147e:	48 8d 05 9b 2b 00 00 	lea    0x2b9b(%rip),%rax        # 4020 <array>
    1485:	8b 04 02             	mov    (%rdx,%rax,1),%eax
    1488:	89 c2                	mov    %eax,%edx
    148a:	be 85 00 00 00       	mov    $0x85,%esi
    148f:	48 8d 3d 95 0b 00 00 	lea    0xb95(%rip),%rdi        # 202b <_IO_stdin_used+0x2b>
    1496:	b8 00 00 00 00       	mov    $0x0,%eax
    149b:	e8 b0 fb ff ff       	callq  1050 <printf@plt>*/
		printf("%d %d\n", 0x85, array[j++]);

    /*14a0:	83 45 f8 01          	addl   $0x1,-0x8(%rbp)
    14a4:	83 7d f8 0a          	cmpl   $0xa,-0x8(%rbp)
    14a8:	0f 8e 53 ff ff ff    	jle    1401 <array_main+0xee>*/
	}

    /*14ae:	b8 00 00 00 00       	mov    $0x0,%eax
    14b3:	c9                   	leaveq 
    14b4:	c3                   	retq   */

	return 0;
}

int main()
{
    /*14b5:	f3 0f 1e fa          	endbr64 
    14b9:	55                   	push   %rbp
    14ba:	48 89 e5             	mov    %rsp,%rbp
    14bd:	b8 00 00 00 00       	mov    $0x0,%eax
    14c2:	e8 4c fe ff ff       	callq  1313 <array_main>*/
	array_main();

    /*14c7:	b8 00 00 00 00       	mov    $0x0,%eax
    14cc:	5d                   	pop    %rbp
    14cd:	c3                   	retq   
    14ce:	66 90                	xchg   %ax,%ax*/
	
	return 0;
}

